package com.itheima;

import com.itheima.dao.BookDao;
import com.itheima.domain.Book;
import com.itheima.service.IBookService;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

/**
 * @author tongchen
 * @create 2022-12-20 22:49
 */
@SpringBootTest
public class teat2 {
    @Autowired
    private BookDao dao;
    @Autowired
    private IBookService service;
    @Test
    public void test(){
        Book book = new Book();
        book.setType("111");
        book.setName("121");
        book.setDescription("12313");
        service.save(book);

    }
    @Test
    public void test1(){
        Book book = new Book();
        book.setType("111");
        book.setName("121");
        book.setDescription("12313");
        dao.insert(book);
    }
}
